package com.example.springbasic.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BaseGetcController {
    @GetMapping("first")
//    @RequestMapping(path = "first", method = RequestMethod.GET)
    String getFirst(){
        return "get请求";
    }

    @GetMapping("/login/{id}")
    String getTopic(@PathVariable String id){
        return "这是id为"+id+"的内容";
    }

    // queryparam
    @GetMapping("/native")
    String getNative(@RequestParam("s") String sid){
        return sid;
    }


}
